Release 10.1A: OpenEdge Development:
Progress 4GL Reference
ADD-INTERVAL function
Adds a time interval to, or subtracts a time interval from, a DATE, DATETIME, or DATETIME-TZ value.
Syntax
datetimeAn expression whose value is a DATE, DATETIME, or DATETIME-TZ.
interval-amountA signed integer (positive or negative) indicating the amount of time you want to add to or subtract from
datetimevalue.interval-unitA character constant, or a character expression that evaluates to one of the following time units: ‘years’, ‘months’, ‘weeks’, ‘days’, 'hours’, ‘minutes’, ‘seconds’ or ‘milliseconds’. These values are case insensitive and may be singular.
Notes
- If
datetimeis a DATE or DATETIME, the time value defaults to midnight and the time zone value defaults to the session's time zone, respectively.- To add or subtract months or years, this function converts the date to Gregorian before adding or subtracting the year or month value. If the result is an invalid date, the function decrements the day part of the date until a valid date is obtained. For example:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |